﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Coolzon.Web.Models
{
    public class DataSeries
    {
        public string Id { get; set; }

        public string Name { get; set; }

        public List<DataItem> DataItems { get; set; }

        public DataItem GetByName(string name)
        {
            foreach (var item in DataItems)
            {
                if (string.Equals(item.Name, name))
                {
                    return item;
                }
            }
            return null;
        }
    }
}
